package com.cjm.one.custom.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
@Data
@Primary
@Slf4j
@ConfigurationProperties(prefix = "minio.config")
public class MinioPropertis {

    private String endpointUrl;


    private String accessKey;


    private String secretKey;


    private String bucketName;
    public void setEndpointUrl(String endpointUrl) {
        this.endpointUrl = endpointUrl;
        log.info("Setting endpointUrl: {}", endpointUrl);
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
        log.info("Setting accessKey: {}", accessKey);
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
        log.info("Setting secretKey: {}", secretKey);
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
        log.info("Setting bucketName: {}", bucketName);
    }
}
